<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> Master login Form Responsive Widget Template  :: w3layouts</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content=" "/>
    <link href="css/style1.css" rel="stylesheet" type="text/css" media="all" />
</head>

<body>
<div class="padding-all">
    <div class="header">
        <h1>Welcome to 后端管理系统</h1>
    </div>

    <div class="design-w3l">
        <div class="mail-form-agile">
            <form action="/login123" method="post" id="name">


                <input type="text" name="username" id="username" placeholder="用户名">


                <input type="text" name="password" id="password" placeholder="密码">

                <button id="TencentCaptcha" data-appid="2082503859" data-cbfn="callback" type="button">登录</button>

                </table>
            </form>
        </div>
        <div class="clear"> </div>
    </div>

    <div class="footer" align="center">
        <p>欢迎登录后端管理系统</p>
    </div>
</div>
</body>

<script src="https://ssl.captcha.qq.com/TCaptcha.js"></script>
<script>
    window.callback = function(res){
        console.log(res)
        // res= {ret: 2, ticket: null}
        // res = {ret: 0, ticket: "String", randstr: "String"}
       var x=  document.getElementById("username")//获取输入框元素
       var y=  document.getElementById("password")//获取输入框元素
        window.location.href="login1234?ticket="+res.ticket+"&randstr="+res.randstr+"&username="+x.value+"&password="+y.value

    }

</script>>
</html>
